<%@ page import="com.qipay.baas.model.ActionDoc" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: dong
  Date: 2017/9/21
  Time: 15:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="head.jsp"></jsp:include>
</head>
<body>

<%
    String isOn = (String)request.getAttribute("isOn");

    if("on".equals(isOn)){%>

<div class="wrapper">
    <jsp:include page="nav.jsp"></jsp:include>
    <div class="pay_type center">
        <div class="title">支付类型</div>
        <div class="list">
            <ul>
                <% List<ActionDoc> list = (List<ActionDoc>)request.getAttribute("lst");
                    if(list!=null&&list.size()>0){
                    for (ActionDoc doc :list){
                %>
                <li class="selectType" id="<%= doc.getId()%>">
                    <a href="${pageContext.request.contextPath}/doc/<%= doc.getId()%>">
                        <b class="ico"
                           style="background:url(<%= doc.getIcon()%>)  center center no-repeat;"></b>
                        <h4><%= doc.getTitle()%></h4>
                        <p><%= doc.getInfo()%></p>
                    </a>
                </li>
                <%}}%>
            </ul>
            <div class="clear"></div>
        </div>
    </div>
    <div class="footer_fixed"></div>
</div>
<jsp:include page="foot.jsp"></jsp:include>
<%}else{%>
<div style="position:fixed;width:100%;height:100%;background:#000;top:0;z-index:0;">
    <div style="width:60%;background:#fff;text-align:center;margin:15% 20%;padding:20px 0;font-size: 14px;">
        请输入网站密码：<input onkeydown="javascript:if(event.keyCode==13) submitPwd();" id="aaa003" type="text" value="" style="height: 35px;"/>
        &nbsp;&nbsp;<button style="padding: 5px;" onclick="submitPwd();">提交</button>
    </div>
</div>
<%}
%>
<script>
        $("#aaa003").keydown(function() {//给输入框绑定按键事件
            if(event.keyCode == "13") {//判断如果按下的是回车键则执行下面的代码
                submitPwd()//弹出提示信息
            }
        })
    function submitPwd() {
        var newpwd = document.getElementById("aaa003").value;
        var url = window.location.host;
        var hrefurl = "/yan?pwd="+newpwd;
        window.location.href=hrefurl;
    }

</script>
</body>
</html>
